﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;

namespace WebApplication1.Admin
{
    public partial class ChiTietDonHang : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string iddh = Request.QueryString["id"];
                List<BLLDonHang> dh=new List<BLLDonHang>();
                List<BLLNguoiDung> nd = new List<BLLNguoiDung>();
                List<BLLSanPham> sp = new List<BLLSanPham>();
                List<BLLChiTietDonHang> ctdh = new List<BLLChiTietDonHang>();
                dh = new BLLDonHang(iddh).GetById();
                nd = new BLLNguoiDung(dh[0].Idnguoidung).GetbyId;
                ctdh = new BLLChiTietDonHang(iddh).GetbyId();
                DtlDonHang.DataSource = dh;
                DtlDonHang.DataBind();
                DtlNguoiMua.DataSource = nd;
                DtlNguoiMua.DataBind();
                GridView1.DataSource = ctdh;
                GridView1.DataBind();
                
            }
        }
    }
}
